#include "BaseEntity.hpp"
#include "../MMessage.hpp"
#include "../SceneManager.hpp"

BaseEntity::BaseEntity() :
m_iEntityID( 0 )
, m_bVisible(false)
, m_eType(UNKNOWN)
{
}

void BaseEntity::setEntityID(int iNewID)
{
	m_iEntityID = iNewID;
}

const int& BaseEntity::getEntityID()
{
	return m_iEntityID;
}

void BaseEntity::update(clock_t tick)
{
}

void BaseEntity::render()
{
}

void BaseEntity::setPosition(MVector3D pos)
{
	m_position = pos;
	invalidatePositionChange();
}

const MVector3D& BaseEntity::getPosition() const
{
	return m_position;
}

void BaseEntity::translate(MVector3D translation)
{
	m_translation = translation;
	m_position = m_position + translation;
}

void BaseEntity::handleMessage(MMessage *pMsg)
{
	delete pMsg;
	pMsg = NULL;
}


void BaseEntity::setVisibility(bool bVisibility)
{
	m_bVisible = bVisibility;
}

bool BaseEntity::isVisible()
{
	if(m_bVisible)
		return true;

	return false;
}

const ENTITY_TYPE& BaseEntity::getType() const
{
	return m_eType;
}

//EOF
